﻿@section head{
    <link href="~/theme/default/home.index.css" rel="stylesheet" asp-append-version="true"/>
}
<div id="app" style="height: 100%;">
    <el-container>
        <el-header>
            <div class="logo zb-pull-left zb-flex zb-flex-center">
                <img :src="url" />
                <span>文件管理系统</span>
            </div>
            <ul class="zb-pull-right header-func">
               <li>
                   <a href="~/Home/Logout" title="退出"><i class="el-icon-switch-button"></i></a>
               </li> 
            </ul>
        </el-header>
        <el-container>
            <el-aside>
                <el-menu>
                    @{#if DEBUG}
                    <el-submenu index="0">
                        <template slot="title">
                            <i class="el-icon-location"></i>
                            <span slot="title">模板管理</span>
                        </template>
                        <el-menu-item>
                            <a href="javascript:;" @@click="addTab('auto','代码生成','/CodeMode/Index')" v-text="'代码生成'"></a>
                        </el-menu-item>
                        <el-menu-item>
                            <a href="javascript:;" @@click="addTab('design','页面设计','/ManageTpl/Index')" v-text="'页面设计'"></a>
                        </el-menu-item>
                    </el-submenu>
                    @{#endif}
                    <el-submenu v-cloak :index="menu.menu_no" v-for="menu in menus" :key="menu.menu_no">
                        <template slot="title">
                            <i :class="menu.menu_icon"></i>
                            <span slot="title">{{menu.menu_name}}</span>
                        </template>
                        <el-menu-item :index="sub.menu_no" v-for="sub in menu.children" :key="sub.menu_no">
                            <a href="javascript:;" @@click="addTab(sub.menu_no,sub.menu_name,sub.menu_url)"><i :class="sub.menu_icon"></i>{{sub.menu_name}}</a>
                        </el-menu-item>
                    </el-submenu>
                </el-menu>
            </el-aside>
            <el-main>
                <el-tabs v-model="activeTabsName" type="card" @@tab-remove="removeTab">
                    <el-tab-pane v-for="(item, index) in tabs"
                                 :key="item.name"
                                 :label="item.title"
                                 :name="item.name"
                                 :closable="item.closable">
                        <iframe :src="item.url" frameborder="0"></iframe>
                    </el-tab-pane>
                </el-tabs>
            </el-main>
        </el-container>
    </el-container>
</div>

@section script{
    <script src="~/module/home/home.index.js" asp-append-version="true" type="text/babel"></script>
} 